from listnode import ListNode, ln_to_int, int_to_ln


def add_two_number(l1: ListNode, l2: ListNode) -> ListNode:
    num1 = ln_to_int(l1)  # 从单链获得整数
    num2 = ln_to_int(l2)
    return int_to_ln(num1 + num2)  # 由整数生成单链


if __name__ == '__main__':
    a = int_to_ln(7243)
    b = int_to_ln(564)
    r = add_two_number(a, b)
